<template>
  <div>
    <el-card>
      <div class="box">
        <el-image
          class="image"
          :src="userStore.avatar"
          :preview-src-list="[userStore.avatar]"
          hide-on-click-modal
        />
        <div>
          <h3 class="title">{{ getTime() }} {{ userStore.username }}</h3>
          <p class="description">蒋爷甄选运营平台</p>
        </div>
      </div>
    </el-card>
    <div class="svg-icon">
      <SvgIcon name="welcome" style="width: 700px; height: 550px" />
    </div>
  </div>
</template>

<script setup lang="ts">
// 引入用户相关的仓库，获取用户头像和用户名称
import useUserStore from '@/store/modules/user'
import { getTime } from '@/utils/time'

const userStore = useUserStore()
</script>

<style scoped lang="scss">
.box {
  display: flex;
  justify-content: left;
  align-items: center;
  height: 100%;

  .image {
    margin: 50px;
    border-radius: 50%;
    width: 100px;
    height: 100px;
    overflow: hidden;
  }

  .title {
    font-size: 25px;
    font-weight: bold;
  }

  .description {
    margin-top: 30px;
    font-style: italic;
    font-size: 18px;
    color: #999;
  }

  .alert {
    margin-left: 80px;
    width: 60%;
    height: 100px;
  }
}
.svg-icon {
  display: flex;
  justify-content: center;
}
</style>
